if vs. in case

*I'll come and see you in case I pass through London.

In case does not mean the same as if. We use in case to talk about precautions: things we do in advance, in order to be safe or ready if there is a problem later. You insure things in case they get stolen, or catch fire, or get broken. The order of events is not the same with in case and if. Compare:

You should insure your house in case there's a fire.
You should telephone 911
if there's a fire.

You insure the house before the fire; you telephone after the fire has broken out. In case expresses a precaution; if refers to a result or consequence.

Take John's address with you, in case you have time to see him when you're in London.
I'll come and see you
if I pass through London.

In sentences about the past, in case is often followed by should, especially in formal style.

I packed a swimsuit in case I should have time to go to the beach.

The expression in case of (often found in notices) has a wider meaning than in case; it can be used in similar situations to if.

In case of fire, break glass. (= If there is a fire ...)