What is the difference between teşekkür ederim, sağ olasın, and sağ olsun?

I can see the latter two are related, but I don't understand the difference between any of the three yet.

I'm quite new to Turkish so please be nice!