\char primitive is not expandable, so its "expansion" is itself, and not "the character whose code is 98". Since the 98 afterwards is not consumed, the next token is
9, and that's different from the
\char token, so you hit the false path.
One way to do this as you want is to
\if\x\x will return true. Another way is to do
\if ^^62^^62; as TeX by Topic tells me on p.44, the
^^ syntax is parsed way before expansions are made (it's actually an input syntax), and therefore
^^62 is one single character. Note (see egreg's comment) that
^^62 is in hexadecimal, while
\char98 is decimal (0x62 = 98).
Maybe I should expand on that "input syntax" comment. There are two kinds of characters in TeX: input characters, which are what you write in a
.tex file, and printable characters, which are what issue a typesetting directive to TeX. In the jargon of the TeXbook, an input character belongs to TeX's "eyes", and an output character to its "stomach". Between those two is the "mouth", where the macro language lives, and
\if belongs to that language. By contrast, although
\char is recognized by the eyes as being a token, its actual function is not known until the stomach, which is when absorbs its arguments and becomes a printable character.
A normal character like
a is both input and printable under the usual catcodes, so
\if aa works as expected, but to get an input character by charcode into
\if you need to use a syntax that is recognized by the eyes, and for that, we have