Use "If then else" actions, like these:
For more information, see the wiki Searching the Forum for Answers section.