Given this definition of a Measurable Function:
A function $f$ defined on a measurable subset $E$ of $\mathbb{R}^d$ is measurable, if for all $a\in \mathbb{R}$, the set $$f^{-1}([-\infty,a))=\{x\in E: f(x)<a\}$$ is also measurable.
We can easily prove that if $f$ is measurable then $\{x\in E: f(x)=a\}$ is measurable where $a \in \mathbb{\bar{R}}$ here.
Now the converse is not true. I am looking for counter example.