Its hard to diagnose without a complete discription. What are the water parameters, what kind of tank was it being kept in? If there are other fish in the tank you should watch and see if anything similar seems to be happening to them and isolate them in a hospital tank.