A Pyrrhic victory might be a bit too negative for what the OP asked, but certainly is in the same bailiwick. It refers to the ancient Greek King Pyrrhus who won a military victory against the Romans but lost so many of his troops that he was reported to have said that "one other such victory would utterly undo him".
Other adjectives that are associated with victory might be more appropriate depending on the details that are being described.
A moral victory is actually a defeat with the consolation of 'knowing' you fought for the 'right' side.
A hollow victory is some sort of victory where the rewards for the victory turn out not to be what was expected, in fact to be not worth the effort of achieving the victory.
Another, perhaps more desirable flavour is a bittersweet victory where some unforeseen negative consequence of victory slightly lessens the still largely positive outcome.