"Oh. Um. That sucks."
Which I mean sincerely, for both their sake and my own. Hahah.
But I usually ask them how they feel sick, and it isn't always going to be stomach related. So knowing how they feel sick can help you determine whether or not you can handle being around them. If it is stomach related, you can try to make a considerate offer like, "We don't have to see the movie now." or go/do whatever. Odds are they might want to go home anyway and then they won't feel bad for leaving.