With bash:
A=10 B=20 C=0 D=1 for var in A B C D; do if [ ${!var} -eq 0 ]; then echo "$var value is 0" else echo "Ok" fi done
Use -eq to compare integer values (or use (( ${!var} == 0 )) or (( !${!var} )) which is the same thing), and use ${!var} to get the value of the variable whose name is stored in the variable var.
Or, a bit neater but essentially the same (still in bash):
for var in A B C D E; do case ${!var} in 0) printf '%s value is 0\n' "$var" ;; *) echo 'Ok' ;; esac done
This treats the values as strings, not as integers.