Spin state switching of the DNA sequences due to external stimuli is investigated theoretically. A molecular-based memory or logic device such as a spin switch could be directly realized within an electronic circuit. The DNA system is subjected an electrical potential difference through the metal leads for controling the spin transport. The spectral analysis of spin states demonstrates that voltage operates as a crucial tool to turns the switch on. The width of functional voltage range changes when the system is subjected to an external magnetic field. The magnetic field reduces the system symmetry and drives the system to the extended state. Hence, the voltage and magnetic field can modulate the spin transport properties of DNA. The ability to control the spin localization/delocalization states in DNA chains opens up a new approach for efficient computation and data storage.