In this paper we study a Dirichlet optimal control problem associated with a linear elliptic equation the coefficients of which we take as controls in L 1 (Ω). In particular, when the coefficient matrix is taken to satisfy the decomposition B(x) = ρ(x)A(x) with a scalar function ρ, we allow the ρ to degenerate. Such problems are related to various applications in mechanics, conductivity and to an approach in topology optimization, the SIMP-method. Since equations of this type can exhibit the Lavrentieff phenomenon and non-uniqueness of weak solutions, we show that the optimal control problem in the coefficients can be stated in different forms depending on the choice of the class of admissible solutions. Using the direct method in the Calculus of variations, we discuss the solvability of the above optimal control problems in the so-called class of H-admissible solutions. Keywords. Degenerate elliptic equations, control in coefficients, weighted Sobolev spaces, Lavrentieff phenomenon, direct method in the Calculus of variations.