This answer came from-
http://whale.wheelock.edu/Welcome.html
The ability to deal with salt water - and, conversely,
to obtain sufficient fresh water - must have been one of the largest
evolutionary challenges facing whales and dolphins when they were
evolving from their land ancestors around 50 million years ago.
The basic answer is twofold. First, fresh water is obtained largely from the whale's food (depending on the species of whale, this is either fish, krill or small planktonic critters like copepods); this occurs when the food is metabolized. The way in which they deal with intake of salt water is essentially by having highly specialized kidneys; these are much more efficient than ours at extracting and eliminating salt.
which illustrate cetacean kidneys and the water issue.
posted by Phil Clampham
Whales require fresh water just like other mammals. Because they live in the ocean, they have to obtain their water in ways that are different from most mammals that live on land. Scientists speculate that mammals that live in the ocean obtain their water from the food they eat. Their bodies appear to be adapted to absorb salt-free water from the fish, krill, and other organisms they eat. Some species might even have mechanisms to take in ocean water and take out the salt so that their bodies can use the salt-free water for metabolic purposes. Scientists are still studying this aspect of whale physiology.
Posted by Martine Berube