Your approach is off to a great start, here are some more specific tips that will get the job done.
The sequence $$f(n) = \frac{p - r}{2}\sin\left(\frac{n\pi}{2}\right) + \frac{p+r}{2}$$
takes values $p, \frac{p+r}{2}, r, \frac{p+r}{2}, p$, etc (so matches what we'd like for odd $n$). We can do something similar to create a function that takes the values we like for even $n$ (using cosine is probably easiest, but you have to be careful with shifting, or negatives).
$$g(n) = \frac{s - q}{2}\cos\left(\frac{n\pi}{2}\right) + \frac{q+s}{2}.$$
But even once you've found a suitable $g$, the sum $f(n) + g(n)$ won't work, because there's interference.
We can get rid of the interference by making $f(n) = 0$ when $n$ is even (when the function doesn't give terms we want), and $f(n) = 1$ when the function already gives us what we want (so when $n$ is odd). This can be accomplished by multiplying it by
$$\bar{f}(n) = \sin^2\left(\frac{n\pi}{2}\right),$$
where $\bar f(n)$ takes values $1, 0, 1, 0, \ldots$ (i.e., will be zero for even $n$, and $1$ for odd $n$). You can also see the similar
$$\bar{g}(n) = \cos^2\left(\frac{n\pi}{2}\right)$$
to get rid of the "bad" terms of $g(n)$.
Thus your sequence can be achieved by
$$\begin{align*}
a(n)
&= \bar f(n)f(n) + \bar g(n) g(n) \\[7pt]
&= \sin^2\left(\frac{n\pi}{2}\right)\left( \frac{p - r}{2}\sin\left(\frac{n\pi}{2}\right) + \frac{p+r}{2} \right) + \cos^2\left(\frac{n\pi}{2}\right)\left( \frac{s - q}{2}\cos\left(\frac{n\pi}{2}\right) + \frac{q+s}{2} \right)
\end{align*}$$
which will look rather complicated if you use the $g(x)$ and $\bar g(x)$ I have in mind. It's probably also possible to use an approach that doesn't require a $0/1$-multiplier (some kind of superposition of more trigonometric functions, maybe), but I'm not really familiar with how it would work.
Of course, one might argue it's a bit silly to use such a complicated formula when
$$a(n) =
\begin{cases}
p, & n \equiv 1 \pmod 4\\
q, & n \equiv 2 \pmod 4\\
r, & n \equiv 3 \pmod 4\\
s, & n \equiv 0 \pmod 4\\
\end{cases}
$$
will do just fine with much less fuss, but to each their own!