Assume that $X$ is a continuous random variable with distribution $f_X$. Let $x$ be the realization of $X$.
Let $g$ be a continuous function
What is $\mathbb{E}[g(X)|X]$?
Applying the definition, we have, $\mathbb{E}[g(X)|X] = \int_{-\infty}^\infty g(x) f_X(x|x) dx$. But what is $f_X(x|x)$?
$f_X(x|x) = f_X(x,x)/f_X(x) = f_X(x)/f_X(x) = 1, \forall x \text{ such that } f_X(x) > 0$.
So is it true that, $\mathbb{E}[g(X)|X] = \int_{-\infty}^\infty g(x) dx, \forall x \text{ such that } f_X(x) > 0?$
Note that the random variable $g(X)$ is $\sigma(X)-$measurable since $g$ is a continuous function. Then a property of the conditional expectation is that if $Y$ is $\mathcal{F}-$measurable then $$\mathbb{E}[Y|\mathcal{F}] = Y \hspace{4mm}a.s.$$ So in your case $$\mathbb{E}[g(X)|X] = g(X) \hspace{4mm}a.s.$$