Technically... Any of the Confederate States were no longer States during the War. The Union had to fight to regain control of the Confederacy (Confederate States of America).
"There were 23 states that remained loyal to the Union during the war: California, Connecticut, Delaware, Illinois, Indiana, Iowa, Kansas, Kentucky, Maine, Maryland, Massachusetts, Michigan, Minnesota, Missouri, New Hampshire, New Jersey, New York, Ohio, Oregon, Pennsylvania, Rhode Island, Vermont, and Wisconsin. During the war, Nevada and West Virginia joined as new states of the Union. Tennessee and Louisiana were returned to Union control early in the war."
"Seven Deep South cotton states seceded by February 1861, starting with South Carolina, Mississippi, Florida, Alabama, Georgia, Louisiana, and Texas. These seven states formed the Confederate States of America (February 4, 1861), with Jefferson Davis as president, and a governmental structure closely modeled on the U.S. Constitution. In April and May 1861, four more slave states seceded and joined the Confederacy: Arkansas, Tennessee, North Carolina and Virginia. Virginia was split in two, with the eastern portion of that state seceding to the Confederacy and the northwestern part joining the Union as the new state of West Virginia on June 20, 1863."
"The Border states in the Union comprised West Virginia (which broke away from Virginia and became a separate state), and four of the five northernmost slave states (Maryland, Delaware, Missouri, and Kentucky)."
One of the longest Wikipedia articles is about this subject.
https://en.wikipedia.org/wiki/American_Civil_War