You can use switch with strings, however you need to test it carefully. Here's how; since String is of type Object it supports the hashCode() function. This will return a 'nearly' unique integer for any given string, and two different but identical strings will produce the same hash code.
Here's the tricky part; you need to remember that the hash code, while good, may return the same code for two different strings! This is why you must test. If however, all the strings to be compared are known at compile time, and you make sure that the hash for each one is different (which is most likely) you will have no problem. Hope this works for you, good luck.
There's a worse problem for using the hashCode of Strings to allow you to use Strings in a switch: the hashCode of a given String can vary from JVM to JVM, and even between versions of JVMs! Because the values in the case labels must be compile-time constants, you cannot use switch and Strings portably.