Switch-case statement works like if-elseif.<br>
As well as you can use regex for if-elseif, you can also use it in switch-case.

    if (preg_match('/John.*/, $name)) {
        // do stuff for people whose name is John, Johnny, ...
    }

 
 can be codded as 

    switch $name {
        case (preg_match('/John.*/', $name) ? true : false) :
            // do stuff for people whose name is John, Johnny, ...
            break;
    }

Hope this help.