Aleph Labs interview question

Difference between switch and if statement and when to use it