Select case?

or maybe you want something running in background? if so, set a timer interrupt the do the Select Case and PORTB=x in the ISR.

That's usually how i handle my pushbuttons...