Which one of the following statements contains a metaphor?

A. The mighty oak is the king of the forest world.
B. The water shone like a thousand diamonds.
C. She was like a bird in a cage.
D. My dream vanished as a puff of smoke.