Since it's quite feasible that we could be looping through quite a few creds (on large pentests etc), and because there aren't many cases here, it would be faster to use if/else statements instead of the case method.  Since the case method uses the '===' operator, it's quite a bit slower than if/else, or so I have read (with benchmarks).  I'll try to find the article if you want.