Switch-case with enum

Can you use switch-case with an enum in Unity? If so, how do you format the conditional check?

FYI, the snippet below does NOT work (with ""'s around the conditional check, I get the cannot == error, as the enum is not a string) . As it is, I get the unknown identifier error.

enum choices{
APPLE,
banana,
canaple
}
function Start(){

var choice:choices=APPLE;
switch(choice){
case APPLE: 
Debug.Log("APPLE");
break;

case banana:
Debug.Log("B");
break;

case canaple:
Debug.Log("CC");
break;

default:
Debug.Log("nothing");
break;
}

}

Yes, you can. Just modifying your code a bit :)

enum choices
{
    APPLE,
    BANANA,
    CANAPLE
}

function Start()
{
    var choice : choices = choices.APPLE;

    switch(choice)
    {
        case choices.APPLE: 
            Debug.Log("APPLE");
            break;
        case choices.BANANA:
            Debug.Log("BANANA");
            break;
        case choices.CANAPLE:
            Debug.Log("CANAPLE");
            break;
        default:
            Debug.Log("NOTHING");
            break;
    }
}