Modern compilers will choose the best compatible construct to replace the construct you have written in your code if necessary. For example, I'm pretty sure most Java compilers will emit an if...else bytecode structure that is equivalent to the switch statement in your Java code.
Some compilers are even clever enough to perform simple refactoring and optimisation of boolean expressions, completely changing the structure of if...else statements while retaining the original semantics and flow of control.
Anyone with a formal education in compiler theory (such as the compiler dev teams at Sun and Microsoft) will consider an if...else statement to be a form of switch, rather than the other way around, since even a simple if (with no else) is usually modelled as a switch statement by compilers. This is because the compiler can apply optimisations to switch constructs easier than can apply them to if...else constructs.
For example, the following two sets of code will result in similar bytecode with only trivial differences that don't warrant mentioning:
switch (condition)
{
case true:
// Do positive condition stuff
break;
default:
// Do negative condition stuff
break;
}
...and...
if (condition)
{
// Do positive condition stuff
}
else
{
// Do negative condition stuff
}
In most languages there are grammatical differences between the two constructs, such as scope rules preventing variables from being declared directly in a case block (most languages require that you declare a new scope first), but there are no semantic differences.
So, in answer, there's no real advantage of using one over the other, except in terms of readability.
The exception is when you start missing out break statements, and allowing control to drop through from one case to the next; in this situation the compiler has to generate additional bytecode to control which case blocks should be executed, resulting in a larger bytecode image and slower execution - not to mention the messy, unreadable and unmaintainable source code ;-)
If you are really interested to see the exact difference, you will need to inspect the bytecode your particular compiler emits for equivalent switch and if...else constructs.