Switch expression contains does not work

This is where I got the idea of using IF function in switch.