case-insensitive if on substring

I'd like to print a line if a substring is matched in a case insensitive manner

something like do a case insensitive search for ABCD as a substring:

  awk '\{ if  \(substr\($1,1,4\) == "[Aa][Bb][Cc][Dd]"\) print $1 \}' infile > outfile 

I'm not certain how to make the syntax work???

Thanks

use toupper or tolower functions of awk..

I'm not certain how that works. I'm new. I want the outfile to retain the case that was in the infile as well.

Thanks again.

this might help.

Oh I get it...

awk '{ if toupper((substr($1,1,4)) == "ABCD") print $1 }' infile > outfile

Thanks you rule!!!