Is it possible to use FName for a switch in C++?

If so, how do you call it? At the moment I’m trying;

switch (MyObject->MyFName.GetNumber())
{
case FNameToCheck.GetNumber():
{}
}

No dice.

Thanks!!