2 possible things i can think of, 1st would be swim bladder infection 2nd dropsy, if its the 2nd I would remove the fish immediately and put it out its pain. 2nd is likely with pond fish more so than tank. so I have posted a little about dropsy as its very nasty and needs instant attention.
www.fish-helpline.co.uk/health/dropsy.html
if its swim bladder then a swim bladder treatment may work but even these tend to work better if the treatment is very earlier stage, the longer it goes on the less likely the fish will recover. either way both are due to poor water or water conditions related. test your water and cure the the cause to stop further problems with other fish.