I realize this highly trivial but it's precisely why I decided to ask it. Also my explanation doesn't quite match the correct one.
On a standard probability triple $(\Omega, \mathcal{F}, P)$ we define a function $$ X({\omega}) = \Bigg\{ \begin{array}{lr} 1 & \text{ if } A \in \mathcal{F}\\ 0 & otherwise \end{array} $$ We need to find $\{\omega: X(\omega) = 1\} \Leftrightarrow X^{-1}(\{1 \}) = A$ and obviously $A \in \mathcal{F}$ by construction of $X$, so $X$ is a Borel-measurable random variable.
I'm sure my solution is solid, but it's a bit different from the correct one. Also it seems somewhat trivial.
Well, the correct definition is
\begin{align*} \chi_A(\omega):=\left\{\begin{array}{clc} 1 & \textrm{if}& \omega \in A\\ 0 & \textrm{if} & \omega\in\Omega\setminus A \end{array}\right., \end{align*} where it is supposed $A\in\mathcal{F}$. Take any interval $(a, b]$ in $\mathbb R$. Then: $$\chi_A^{-1}((a, b]))=\left\{\begin{array}{lcl} \Omega & \textrm{if}& 0\in (a, b]\ \textrm{and}\ 1\in (a, b]\\ \Omega\setminus A & \textrm{if} &0\in (a, b]\ \textrm{and}\ 1\not\in (a, b] \\ A & \textrm{if} &0\not\in (a, b]\ \textrm{and}\ 1\in (a, b]\\ \phi & \textrm{if} &\textrm{if}\ 0\not\in (a, b]\ \textrm{and}\ 1\not\in (a, b] \end{array}\right..$$
In any case, $\chi_A^{-1}((a, b])\in \mathcal{F}$. Since the Borel sigma algebra on $\mathbb R$ is generated by intervals of the kind $(a, b]$, $\chi_A$ is measurable.