This could be an abcess or a tumor. If its an abcess the vet may be able to lance and drain it for you and give you antibiotics. If its a tumor there may not be much that can be done.
You can read about hamster problems here to see if anything matches what you are seeing
http://www.hamsterific.com/IllnessGuide.html
If its swollen from the cheek back it might just be an impacted cheek pouch and a vet can rinse that out for you resolving the problem.
Hope this helps you!
Please press Accept if you find my answer helpful. Want more info? Just reply on your question!
Bonuses for good work are always appreciated!
Thanks for the opportunity to help you!