Take a particle of mass $m$ trapped in an infinite potential well between $0$ and $a$. The energy spectrum and the wave functions are
$$\displaystyle E_n = \frac{\hbar^2\pi^2}{2ma^2} n^2$$
$$\displaystyle \psi_n(x) = \sqrt{\frac{2}{a}} \sin\frac{n\pi x}{a}$$
Now if the same particle is trapped in 3D rectangle of sides $a$, $b$, and $c$ we have
$$\displaystyle E_n = \frac{\hbar^2\pi^2}{2m} \left(\frac{n_x^2}{a^2} + \frac{n_y^2}{b^2} + \frac{n_z^2}{c^2}\right)$$
$$\displaystyle \psi_n(x,y,z) = \sqrt{\frac{8}{abc}} \sin\frac{n_x\pi x}{a} \sin\frac{n_y\pi y}{b} \sin\frac{n_z\pi z}{c}$$
Since the 3D case is more general than the 1D case, in principle one can take the limit to get the 1D case. Taking b and c tends to infinity will reproduce the 1D spectrum but it will kill the wave function.
How to take the limit on $\psi_n(x,y,z)$ to get $\psi_n(x)$ ?