The selection of the solver is based on whether the fluid is compressible or incompressible. Even the gases can be considered incompressible if the pressure gradient in the flow is not large enough to change the density significantly. But if you have a large pressure gradient or if the fluid has mach number greater than 0.3 then density based solver is preferred.