Mechanics behind capillary depression.
Notice the angle that the water makes with the wall of the capillary compared to the mercury. Each fluid has its own characteristic contact angle. In the case of a wetting fluid like water, the contact angle is positive, and, in the case of a non-wetting fluid like mercury, the contact angle is negative. (Actually, the contact angle depends on the surface involved, and the presence of contaminants in the liquid). If the contact angle is positive, the fluid will rise, and if the contact angle is negative, the fluid level will fall. Do the force balance and see how it works.