In $\S 1.4$ of Real Analysis: Theory of Measure and Integration by J. Yeh, the author provided an example:
Let $\boldsymbol{\mathfrak C}=\{[n,n+1):n\in\mathbb Z\}.$ The $\sigma$-algebra spanned by $\boldsymbol{\mathfrak C},~\sigma(\boldsymbol{\mathfrak C}),$ is the collection of all countable unions of members of $\boldsymbol{\mathfrak C}.$ An extended real-valued function defined on $\mathbb R$ is $\sigma(\boldsymbol{\mathfrak C}) $-measurable if and only if it is right-continuous step function with jump discontinuity occuring at integers in $\mathbb R$ only.
Now, it's easy to see that functions of such type are $\sigma(\boldsymbol{\mathfrak C}) / \boldsymbol{\mathfrak B}_\mathbb R$ measurable. But I am not able to formalize how it is the other way. Any hint would be appreciated.
If $f$ is $\sigma(\boldsymbol{\mathfrak C}) $-measurable then $f^{-1} (\{f(n)\})$ is a union of the (disjoint) intervals $[k,k+1)$ and it contains $n$. Hence it must contain $[n,n+1)$. Can you finish?
In general, measurable functions are constant in atoms.