No matter where I lived in the U.S. at the time, I would have supported the Union. I would even leave my home state to support them. Although the Confederacy had the right and privilege to attempt secession, I could never support their ideals or their policies, especially in regards to human rights.
Being a native Floridian, I would have sided with my state, which seceded from the Union and joined the Confederacy. States rights and allegiance to one's native state was much stronger 150 years ago than it is today, and I would have probably volunteered to fight with Florida's troops. As a college grad and a teacher, I probably would have been a lower ranking officer, and would have been proud to serve under General Edward Perry in the Florida Brigade, which was decimated during Pickett's Charge at the Battle of Gettysburg.
I agree that it would largely depend on where you lived. On the other hand, there is a degree to which this would be about your political attitudes. There were many in the North who disliked the war because they believed in states' rights or because they did not want the slaves to be freed and come North and compete for jobs.
So this kind of depends. I imagine that if I were a low-paid, unskilled worker in the North I would really worry about what would happen to my job if slavery ended and I would have been much less likely to fight for the North.
Obviously whether you would fight, or who you would fight for would be dictated largely by where you lived, and especially which social class you belonged to. That reveals much about the nature of the conflict. Both sides instituted a draft, and both sides at various points allowed individuals to hire a substitute in their place if they were drafted. In the South, those with 20 slaves could be exempted, a fact which tells us much about who this war was being fought for- the slaveholding class who advocated secession in the first place, but were legally shielded from putting their own lives on the line to protect their interests.