I guess there will be no automatic way in LaTeX (and friends) to keep track of when how may lines overlap and shift them accordingly only at the overlapping areas. That is why suggest to just shift the whole lines.
For more details please have a look at the comments in the code.
% used PGFPlots v1.14
% (this is an answer to the follow-up question of
% <http://tex.stackexchange.com/q/357358>)
\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
width=10cm,
height=2cm,
scale only axis,
axis lines=left,
xmin=0,
xmax=500,
no markers,
ymin=-0.25,
ymax=2.25,
ytick={0, 1, 2},
yticklabels={state one, other state ,third state},
% (moved common `\addplot' options here)
const plot mark right,
]
% -----------------------------------------------------------------
% for now please ignore these commands.
% (Later it will be referenced and then you can/should read the
% comments on these commands)
% -----------------------------------------------------------------
% define a variable to count the number of `\addplot's
% and initialize it here to zero
\pgfmathtruncatemacro{\PlotNum}{0}
% -----------------------------------------------------------------
\addplot+ [
% -----------------------------------------------------------------
% please skip this option too, if you first come here
% -----------------------------------------------------------------
% of course this option should be used at *every* `\addplot'
% command, also the first one. This has the advantage that you
% could also apply a negative number to the initial value of
% `\PlotNum', so that the "middle" `\addplot' command is at the
% same height as the corresponding `yticks'
yshift=\PlotNum*\pgflinewidth,
% -----------------------------------------------------------------
] coordinates { (0,0) (200,0) (300,1) (400,2) (500,0) };
% now just increase the value by one each time a new `addplot' follows
\pgfmathtruncatemacro{\PlotNum}{\PlotNum+1}
\addplot+ [
% when you don't change the linewidth, you can simply shift the
% plot by the (default/set) linewidth
yshift=\pgflinewidth,
% % (for the default linewidth `thin' this would be 0.4pt, as is
% % written in the pgfmanual (v3.0.1a) in section 15.3.1 (on page 166))
% yshift=0.4pt,
] coordinates { (0,1) (150,0) (450,2) (500, 1) };
\pgfmathtruncatemacro{\PlotNum}{\PlotNum+1}
\addplot+ [
green,
% % with changing `linewidth' one would have to do a manual approach
% % like the following ...
% % -----
% thick,
% % half linewidth of the first `\addplot'
% % + sum of all linewidth of the "middle" `\addplot's
% % + half the linewidth of this `\addplot'
% yshift=0.2pt + 0.4pt + 0.4pt,
% -----------------------------------------------------------------
% % ... but if the `linewidth' doesn't change you can simply do ...
% yshift=\plotnum*\pgflinewidth,
% ... which unfortunately doesn't work, because in this context
% `\plotnum' doesn't seem to be not known. This is, why we simulate
% this by defining `\PlotNum' which can be found before each
% `\addplot' command and use it here
yshift=\PlotNum*\pgflinewidth,
] coordinates { (0,1) (100,0) (250,1) (350,2) (500, 0) };
\end{axis}
\end{tikzpicture}
\end{document}
