Please click on link to know about switch statement and if-else statement.
Usually both are equally efficient. The compiler implements them using jump instructions. But each of them has their own unique advantages. It depends on our programming use, if we have to select a case among the n number of cases where n is greater than 2 then use of switch is more efficient.