Let me answer a different question that I think is relevant in connection to the one above. Let us ask:
Can we find a function $g\colon[0,1]\to\mathbb{R}$ that is differentiable everywhere (so, in particular, $g$ is continuous), monotonic (=“nondecreasing”) on $[0,1]$, constant on every interval whose interior is disjoint from $C$ and non-constant on every open interval that intersects $C$?
(In slightly more imprecise language, we demand that $g$ is differentiable and monotonic and “grows only on $C$”.)
The answer (which I found rather surprising) is yes, and it is given in Andrew Bruckner's (excellent) book Differentiation of Real Functions (2d ed., 1994), specificially chapter 2 theorem 6.8 (and the discussion preceding it). Let me give the salient points of the construction:
Proof. Let $A \subseteq C$ be the set of points of density of $C$ (i.e., the interior of $C$ for the density topology): by Lebesgue's density theorem, we have $\mu(A) = \mu(C)$. By a standard fact on Lebesgue measure (e.g. Wikipedia property #10) we can find $E \subseteq A$ be an $F_\sigma$ set such that $\mu(E) = \mu(A)$.
Now the following theorem is stated and proved in Bruckner's book (chapter 2 theorem 6.5):
Theorem: If $E$ is an $F_\sigma$ set whose points are all density points (i.e., $E$ is open for the density topology), then there exists an approximately continuous and upper semicontinuous function $u$ such that $0<u(x)\leq 1$ for all $x\in E$ and $u(x) = 0$ for all $x\not\in E$.
(That $u$ is “approximately continuous” means that $u$ is continuous from $\mathbb{R}$ with the density topology to $\mathbb{R}$ with the usual topology.)
I won't copy the proof of the above theorem here although it's interesting, because it's a bit too long, but the original reference is Zahorski, “Sur la première dérivée”, Trans. Amer. Math. Soc.69 (1950) 1–54, §3, lemma 11 (on p. 26).
Also recall that every bounded approximately continuous function is a derivative (Bruckner, op. cit., chapter 2 theorem 5.5(a)), of a function $g$ which here we can simply reconstitute by taking the Lebesgue integral$$g(x) = \int_{0}^x u(t)\,dt$$
So $g$ is differentiable everywhere with derivative $u$, which vanishes outside of ($E$ hence outside of) $C$, and in particular on every open interval disjoint from $C$, so $g$ is constant there (and of course by continuity this implies that $g$ is constant on every interval whose interior is disjoint from $C$). On the other hand, if $I$ is an open interval that intersects $C$, then it intersects $C$ along a set of positive measure, so also $I$ also intersects $E$ along such a set, so $I$ contains a point where $g'(x)>0$ so $g$ is not constant on $I$. ∎
✱ To connect the function $g$ constructed here with the $f$ of the question, note that there exists an increasing homeomorphism $\varphi\colon\mathbb{R}\to\mathbb{R}$ (unique on the interval $[0,\frac{\alpha}{1-2\alpha}]$ which is the range of $f$) such that $g = \varphi\circ f$. So: I don't know where $f$ is differentiable, but by outer-composing with a homeomorphism, i.e., by modifying the “levels of constancy” that $f$ takes on the connected components of $[0,1]\setminus C$ we can get a similar staircase-like function $g$ which is differentiable everywhere.