...and:

why are you checking the buttons inside the case-staments, when the case-statements are only executed, if the Buttons are pressed ?

Do you think, this will be the optimal way ?

After programming several decades in assembler, i think it is better, to check the Port-Bits and call the subroutines...