help with script parameter checking based on environment

I need to check if the parameters are correctly passed based on the Environment I am in.

For e.g when I am in dev the 1st paramter needs to be either A OR B OR C OR D
similarly when I am in qa the parameter needs to be either e or f

so i need to write a case staement or a if statement to acheive this

I wrote a case statement as below. SIEBELENV is an environment variable from the .profile

case $SIEBELENV in
        DEV)       SERVER_PATH="A|B|C|D" ;;
        QA)        SERVER_PATH="E|F" ;;
        *)    echo "$(date). Invalid ENV variable $SIEBELENV. Please check environment variable file." >> $LOG_FILE
                    rc=2
                    return $rc
                    exit ;;
esac

I have set the paths correctly based on the enviroment. but I need to make sure when the script runs in dev with a parameter equal to any of the FTP paths set for dev from case statment then only proceed
otherwise send an mail saying wrong parameters based on environment.

for e.g script would be called like this interface.ksh A g4 ( A is the SERVER_PATH ). I need to see if this is running in dev it should accept only either A or B orc or D

Otherwise throw an error that environment and paramter doesn't match

How can I do this

You can put a case statement inside your cases, or you can smoosh the variables together to make it one big case:

case "$SIEBELENV:$SERVER_PATH" in
        DEV:[ABCD]) ;;
        QA:[EF]) ;;
        *)
                echo "Invalid combination of $SIEBELENV with $SERVER_PATH"
                exit 1
                ;;
esac