You can use a Switch/Case
Also try checking these examples
For more information, see the wiki Searching the Forum for Answers section.