Question: what to say when someone is terminally ill in a card?
Answer: Thank you for telling me about your illness. I know it must be difficult to share this with people.
This is so hard. I wish this wasn't happening to you.
I'm here in any way you need me. ... 
How are you holding up? ... 
Thank you for all you have done for me. ... 
I love you.