A numerical method is presented for computing incompressible gas-liquid (or two-fluid) flows with immersed solid boundaries on fixed Cartesian meshes. A level set technique for tracking the gas-liquid interface is modified to treat the contact angle condition at the gas-liquid-solid interline as well as the no-slip condition at the fluid-solid interface. The no-slip condition is imposed by introducing another level set for fluid-solid phases and an effective viscosity formulation. In the immersed solid region where the level set function for gas-liquid phases is not well defined, its zero level set is calculated so that the contact angle condition should be satisfied where the three phases meet. The numerical method is validated through computations of interfacial motion subject to Taylor instability, single-fluid flow past a circular cylinder, and bubbles adhering to a cylindrical solid.