Name.com interview question

Working through converting if/else block into a switch. Familiarity with SQL, Frontend tech, etc.