What is the difference between お元気に、お元気で、気をつけて？


I want to say hello to a friend I haven't seen for a long time, and end my
message with "take care". All of お元気{げんき}に, お元気{げんき}で and 気{き}をつけて mean "take
care", so which one suits my case?  
How should I say it?

And I want to distinguish them clearly.

