Is the word "case" used in the same way in the following two sentences?

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

Latin has six cases, and remnants of a seventh.
different meanings