Only 1 is correct. "in case" + clause is a reason clause. It's neutral and not especially informal.
e.g. I will take an umbrella in case it rains = I will take an umbrella because it is possible that it will rain
"in case of + noun phrase" is a conditional expression used most often on formal official notices related to safety during disasters or emergencies
e.g. In case of fire, please use this fire extinguisher = If there is a fire, please use this fire extinguisher