The solvability in Sobolev spaces is proved for divergence form second order elliptic equations in the whole space, a half space, and a bounded Lipschitz domain. For equations in the whole space or a half space, the leading coefficients $a^{ij}$ are assumed to be measurable in one direction and have small BMO semi-norms in the other directions. For equations in a bounded domain, additionally we assume that $a^{ij}$ have small BMO semi-norms in a neighborhood of the boundary of the domain. We give a unified approach of both the Dirichlet boundary problem and the conormal derivative problem. We also investigate elliptic equations in Sobolev spaces with mixed norms under the same assumptions on the coefficients.