Hi Zimbali,
usually the requirements call for a limited number of gain factors, e.g. 1, 10, 50, 100. In that case you can use analog switches with different attached gain resistor values. Make sure the resistor values are not too extreme, so that the analog switch doesn't introduce too much...