if( state equals A) { Take action1 } elsif( state equals B) { Take action2 } else { Take action3 }