Does the word "case" have the same definition in the next two sentences?

The teaching consists of theory lessons and case studies.

It may rain in which case the picnic will be canceled.
the same meaning