In case, in case of

How to use in case and in case of correctly.

In case
We use in case to express that we are doing something in preparation for something which might happen. Take an umbrella in case it rains!
I'll buy two bottles of wine in case one is not enough.

In case of
We use in case of to say what we should do if or when something happens. In case of fire, leave the building as quickly as possible.