OK, you can do this since the .NET regex engine can handle recursive matches, but it's a little complicated. I'm getting the feeling that a parser would be better suited for this scenario (you need to write one anyway)...
Regex regexObj = new Regex(
@"{@IF\(['""]?([^'""]*?)['""]?\s* # Match IF statement, first part.
(==|!=) # Match comparison operator.
\s*['""]?([^'""]*?)['""]?\):} # Match rest of IF statement.
(?> # Then either match (possessively):
(?: # the following group which matches
(?!{@IF\(|{@ENDIF;) # only if we're not at the start of an IF/ENDIF
. # any character
)+ # once or more
| # or
{@IF\( (?<Depth>) # match inner IF (and increase nesting counter)
| # or
{@ENDIF; (?<-Depth>) # match inner ENDIF (and decrease the counter).
)* # Repeat as needed.
(?(Depth)(?!)) # Assert that the nesting counter is at zero.
{@ENDIF;} # Then match ENDIF.",
RegexOptions.IgnorePatternWhitespace | RegexOptions.Singleline);