whim
Definitions
A sudden desire or change of mind, especially one that is unusual or unexplained.
An odd or capricious notion or fancy.
Examples
She bought the expensive dress on a sudden whim.
We decided to drive to the coast on a whim, just to see the ocean.
The king ruled according to his every passing whim, regardless of the consequences.