Tunable spin Hall effect by Stern-Gerlach diffraction