SELECT CASE ... END SELECT


    SELECT CASE expression
    { CASE caseTest {, caseTest }
        { statement } }
    [CASE ELSE
        { statement } ]
    END SELECT
The Select statement is used to perform a series of tests on the same value. Unlike C, only a single Case branch is executed. caseTest is one of the following:

    IS = | <> | < | > | < | >= expr
    expr TO expr
    expr
For example:

    SELECT CASE a
    CASE 1, 3
        PRINT "The value is either 1, or 3"

    CASE 4 TO 6, 8
        PRINT "The value is 4, 5, 6, or 8"

    CASE IS < 12
        PRINT "The value is greater than 12"

    CASE ELSE
        PRINT "The value is something else"

    END SELECT