use strings in case statement options

I iterate in string list well but when I try to add a case statement in order to wrap the string value in a more accurate message I faced different problems.

#Code starts
ST_CODES="CN CU BU CQ LE"
for ST_CODE in $ST_CODES
do
#echo $ST_CODE
CODE="$ST_CODE""\n"
case "$CODE" in
"CN") echo " Countries " ;;
"CU") echo " Currencies" ;;
"BU") echo " Business Units";;
"CQ") echo "Currency Quotations";;
"LE") echo "Leagal Enities";;
esac
done
#Code finish

Thanks in advance!

When you ask question, try to be more precise. What kind of problems have you been facing? Your code doesn't produce any errors. Each time the 'CODE' variable is tested in 'case' construct, there is no match, because of extra newline character appended to 'CODE' variable.

1st you add newline to the variable
CODE="$ST_CODE""\n"
Why ?

if you don't do that then your case works fine.
CODE="$ST_CODE" is enough

Thanks fellows!

Now work fine. In the first script I didn't use the newline character but I introduced a control character.