There are numerous ways of establishing residency - some of the popular ones used in the military are to buy property, registering to vote, getting a drivers license, etc.... You can't just chose a state to write down on your W-2; otherwise everyone in the US would live in FL and TX!
USMCFLYR