Given this piecewise constant function
$$ f(x,a,b,c,d,e) = \begin{cases} a, & x \lt d; \\ c, & d \le x \lt e; \\ b, & e \le x. \\ \end{cases} $$
do the partial derivatives $\frac{\partial}{\partial a}f$, $\frac{\partial}{\partial b}f$, $\frac{\partial}{\partial c}f$, $\frac{\partial}{\partial d}f$, $\frac{\partial}{\partial e}f$ exist?
I would guess
$$ \frac{\partial}{\partial a}f = \begin{cases} 1, & x \lt d; \\ 0, & d \le x. \\ \end{cases} $$
$$ \frac{\partial}{\partial c}f = \begin{cases} 0, & x \lt d; \\ 1, & d \le x \lt e; \\ 0, & e \le x. \\ \end{cases} $$
$$ \frac{\partial}{\partial b}f = \begin{cases} 0, & x \lt e; \\ 1, & e \le x. \\ \end{cases} $$
but I have no idea on how to compute $\frac{\partial}{\partial d}f$ and $\frac{\partial}{\partial e}f$.
For the same reasons you guessed the other derivatives: $\partial_d f(x,a,b,c,\bar d, e) = 0$ unless $x = \bar d$ and $a\ne b$ or $a\ne c$ and $\bar d = e = x$ and analogously
$\partial_e f(x,a,b,c,d,\bar e) = 0$ unless $x=\bar e$ and $b\ne c$ or $a\ne c$ and $\bar e = d = x$
The undefined region for each derivative each is where $f$ has a jump discontinuity because of $a\ne b$ (or $a\ne c$ and $d=e$ so the middle case drops out)
Also note that all your partial derivatives are undefined at the jump points (so you must exchange all $\le$-signs by $<$-signs to be completely correct.