One recites a Beracha before drinking water only if he drinks "Li’sma’o," meaning, to quench his thirst. But if he drinks for some other purpose, such as to clear his throat or for swallowing a pill, or if a nursing mother is drinking water to maintain her milk supply but does not feel thirsty, or somebody needs to drink large amounts of water in preparation for a medical procedure, no Beracha is recited. In all these situations, the individual does not receive enjoyment from the water, and he therefore does not recite a Beracha.
If one drinks club soda for one of these reasons, then he recites a Beracha only if he derives enjoyment from the bubbles as he drinks. Otherwise, if he does not enjoy the bubbles, then club soda is no different from water, and he recites a Beracha only if he drinks to quench his thirst. It goes without saying that if the club soda is flavored, then one recites a Beracha, since he derives enjoyment from the flavor.
The consensus among the Halachic authorities is that mineral water is treated as ordinary water in this regard. Even if it comes from specific springs and has a distinct taste, nevertheless, it is regarded as ordinary water, and requires a Beracha only if one drinks for the purpose of quenching his thirst.
(Based on Yalkut Yosef – Berachot, vol. 3, p. 120, in the footnote)
Summary: One recites a Beracha before drinking water only if he drinks for the purpose of quenching his thirst, but not if he drinks due to some medical need, to clear his throat, or to help him swallow a pill. If the water is flavored, or if it is carbonated and one derives enjoyment from the bubbles, then a Beracha is recited even in the aforementioned situations.