In the very dense substance
Light will travel at c (approximately
When entering a medium it slows down. The extent it slows down is given by the refractive index of the medium,
The refractive index of air is 1.0003 and water is 1.333 so the light is slowed down more in water than in air. The reasons for this change are linked to the interaction of particles in the medium with the electromagnetic field of the light.
The change in speed is a function of optical density (rather than "mass to volume" density). However, it would be reasonable to assume that the light will slow down more in the dense substance as it will have increased likelihood of interacting with the medium than in air (or than in the very loose substance).