What is an active character's character code in the "eyes" of an \if construct?

If you suppress expansion with \noexpand then it acts like a command name so is a character code if it is let to a character,

If you suppress expansion with \string then \if sees a non-active token of catcode 12, with the character code of the original character.

\catcode`@=13
\let@=X

\if\noexpand @X yes \else no\fi


\if\noexpand @ \string@ yes \else no\fi


\bye

makes

yes no

as \noexpand tests equal to X here as it is \let to X note however that if the character is \let to a character as here, then it isn't expandable so the \noexpand isn't needed.