Sounds like some if statements would be used.

What problems are you having? Post your code and ask some questions about it.