The best response, written or verbal, is one from the heart. A new diagnosis may be something the person does not wish to think about. A card that implies the writer is thinking about the person is enough to let the person know they matter.
Think about the person receiving the card, because any card or written words should reflect their emotions. Most people with terminal cancer or another serious illness like to know that they have friends. They do not want someone to start treating them differently. The person still wants to laugh, so sometimes humor is the best choice when writing a card. Avoiding "sorry" or get well cards is often a good idea.