This function sequence is defined over $\left[-\frac{L}{2},\frac{L}{2}\right]$ (all elements are valued 0 outside this interval):
$$\psi_n(x)=\begin{cases}\sqrt{\frac2{L}}\sin{\left(\frac{n\pi x}{L}\right)} & n \text{ even} \\ \sqrt{\frac2{L}}\cos{\left(\frac{n\pi x}{L}\right)} & n \text{ odd}\end{cases}$$
I would like to create a Mathematica function that takes a natural number $N$ as a single parameter, and returns the corresponding function definition from the sequence. Looks like it boils down to substituting $n=N$ and substituting $\sin\oplus\cos=\begin{cases}\sin & N \text{ even} \\ \cos & N \text{ odd}\end{cases}.$
How can I achieve this?