To answer your question, in determining whether someone is a great military commander, their cause matters not. The question was not, in the hypothetical posed by the starter of this thread, who is the greatest human being that ever lived, or the most influential or the kindest. Who was the greatest military commander.
When asking that question, you are looking at some pretty bad actors--Genghis, Caesar, Napolean, Nazis, Muhammad and Saladdin, the Turks, Cyrus, and your favorite villain, Sherman. To determine "greatness" in military matters, you look at what their objective was, and their cleverness, efficiency, leadership and other ways they accomplished their objective.
What an incredible dodge to claim that the North could have achieved its objective by ways other than Sherman's March, including by surrendering and allowing the south to secede. That betrays another failure to understand the question asked. The North could have continued to fight the war McClellan's way, and perhaps would have won eventually, although I doubt it. That would not have made the North's general's great, however, because they would have been squandering their resources and accomplishing their goals in a stupid way, much the way Russian tsars and commissars won by sending waves of peasants at an enemy until the enemy ran out of bullets.
They could have chosen not to fight at all, but that would not have been a very good way to achieve the objective, now would it?
The question assumes that there is a general, he has an army, the army is given an objective, and the general achieves it. Now who did it the best?
Would you say that the best football coach is the one whose team had the fewest penalties? The one who forfeited the game? Or the one who won by the highest score, or defeated the strongest team? Hmmmmm. Think on that, and when you can tell me which football coach is the greatest, then maybe you can ponder which military commander is the greatest, and take your sesquicentennially old grievances out of the equation.