From my GanderBag:

: 4CASE.ALS by Kenneth Albanowski [70705,126]
:
:   This is a set of aliases for 4DOS Version 4.0 only.
:
:   Load it with ALIAS /R 4CASE.ALS
:
:   Have you been looking for a way to make your batch files clearer?
:   Miss the SWITCH (or SELECT) statement from your favorite programming
:   language? This alias file contains a set of aliases to allow you to use
:   SWITCH statements in your 4DOS batch files. Like IFF commands, they are
:   fully nestable.
:
:   They are used as follows:
:
:     SWITCH "%VAR"   ^REM  To use text, you should surround it in quotes
: CASE "ABC"
:    ECHO This will be echoed if %VAR is equal to ABC
: CASEIF NE "DEF"
:    ECHO This will be echoed if %VAR is not equal to DEF
: CASETEST 1 gt 3
:    ECHO This will never be echoed.
:    ECHO Note that CASETEST does not use the original SWITCH parameter
: CASEELSE ^rem Or ELSECASE!
:    ECHO This will only be echoed if none of the other tests
:    ECHO succeeded.
:     ENDSWITCH ^REM Or ENDCASE!
:
: If you need to contact me, E-MAIL me a message at [70705,126]
:
SWITCH=set case_level=%@eval[%case_level+1]^set CASE_VAR%case_level=%1^iff 1==2
then
CASE=elseiff %[CASE_VAR%[case_level]] == %1 then
CASEIF=elseiff %[CASE_VAR%[case_level]] %1 %2 then
CASETEST=ELSEIfF %& then
CASEELSE=else
ELSECASE=caseelse
ENDCASE=endiff^set case_level=%@eval[%case_level-1]
ENDSWITCH=ENDCASE

