\iftrue
  \expandafter\let \expandafter\A \csname iffalse\endcsname
\else
  \expandafter\let \expandafter\A \csname iftrue\endcsname
\fi

\expandafter\let \expandafter\B \csname fi\endcsname

\documentclass{article}

\begin{document}

AAA

\A

BBB

\B

\end{document}
