Apple interview question

how to design a FSM using switch-case / shift register