Another way is to force the shell to do a case insensitive comparison:
Code:
#!/bin/bash
shopt -s nocasematch
if [[ "TEST" = "test" ]]
then
echo "Matched"
fi
shopt -u nocasematch
shopt -s sets the option, whereas shopt -u disables it.
Edit: beaten by bigrigdriver!
