SOH CAH TOA is a mnemonic that can help you remember
Sin = Opposite/Hypotenuse
Cos = Adjacent/Hypotenuse
Tan = Opposite/Adjacent
In the given figure, you have the side Adjacent to the angle, and you have the Hypotenuse. Thus the Cosine relation is useful to you.
... cos(45°) = 12/c
Multiply by c/cos(45°) to get
... c = 12/cos(45°)
Use your calculator and/or your knowledge of the values of the trig functions to determine cos(45°) = 1/√2, so ...
... c = 12√2 ≈ 16.97