mucocele . Its called as mucocele. It's not cancer . And it's not ulcer. It's a cyst. Go to a dentist. Preferably an oral surgeon. And get it removed.
It usually occurs due to sharp tooth edge or due to trauma (hit)
Next Steps
search an oral medicine doctor like me for precise diagnosis then u would be referred to an oral surgeon
Health Tips
not to worry. it's not cancer.
take care.