Using an if/else condition

The value (4) of the variable isn't equal to 1, 2 or 3
The if/else-condition allows for logic in php. It is a very simple way to check if one or multiple variables conform to a defined value.
If so, the condition uses the statement of that part of the if-statement. If none are true, the else-clause will be used.

Using a switch/case statement

The value (3) of the variable is equal to 3
The switch/case-statement is often use to replace if-elseif-else conditions as they can get cluttered easily.
The swtich/case calls the case directly making it easier to read in code. It is not necessary to use in easy cases but can be useful if you have to check for a lot of things.