Spasms,esophagus Cramp,heartburn,weight Gain,endoscopy
Thanks for your query.
Painful swallowing is known as odynophagia. Causes for odynophagia include esophgeal ulcerations from reflux disease , fungal or viral infections, drug related ulcers and rarely cancers . In a morphologically normal esophagus, abnormal diffuse spasms of esophgeal muscles can result in odynophagia .
In your case, cancers seems less likely considering the duration of 2 years. reflux disease or diffuse esophgeal spasms are likely option.
Endoscopy is best initial investigation to differentiate among these conditions, though barium swallow, manometry and 24 hour phmetry may be required to come to definite diagnosis.
So rest assured I do not considered it to be a cancer.Do get the endoscopy done which gives more information to think on.
Hope I have answered your query. If you have any follow up queries I will be available to answer them.