Basic C Programming Question On Microcontroller
As you noted, you have a logic flaw where several of your if statements might be true simultaneously. This should be solved with the equivalent of switch, namely if() else if() .... This is the least of the problems though.

The root of your problems seems to be the lack of "debouncing", which is mandatory for all forms of buttons and switches. This is absolutely necessary unless you have external RC filters, which is most often not the case, since HW designers count on software to deal with it. I won't describe "debouncing" here since it's typically addressed early on in any beginner embedded course.

Your switch statement reads the GPIO register once, so it seems to work, by luck. But the if-else reads the same register in multiple places, over time.

Another problem is that in general, you should not treat hardware registers like ordinary variables. They are volatile qualified, meaning that each access to them is unique. The compiler is not allowed to optimize the access, so several reads over time might produce different results.

Therefore best practice is to isolate access read/write to registers on lines of their own. Don't mix such access with complex expressions.

What you should do no matter if-else or switch, is to read the register once, store the result in a temporary local variable and then work with that variable when determining which button that was pressed.