Quaternions acting up

For some reason the quaternions in the left and right if statments aren’t working properly. The object is supposed to move to the left and right, but it just turns down to 180 degrees.

	if(Input.GetKeyDown(KeyCode.UpArrow) && SwordReset == 0){
		Sword.transform.rotation = new Quaternion(0, 0, 0, 0);
		SwingTime = STLength;
	}
	if(Input.GetKeyDown(KeyCode.DownArrow) && SwordReset == 0){
		Sword.transform.rotation = new Quaternion(0, 0, 180, 0);
		SwingTime = STLength;
	}
	if(Input.GetKeyDown(KeyCode.LeftArrow) && SwordReset == 0){ 
		Sword.transform.rotation = new Quaternion(0, 0, 90, 0); //The first issue
		SwingTime = STLength;
	}
	if(Input.GetKeyDown(KeyCode.RightArrow) && SwordReset == 0){
		Sword.transform.rotation = new Quaternion(0, 0, 270, 0); //The second issue
		SwingTime = STLength;
	}

I think you’re confusing Quaternions and Euler Angles.

This might be what you really want:

Sword.transform.rotation = Quaternion.Euler(0, 0, 270);