Hello and welcome to healthcare forum.
As you said you are having on and off swelling of your right testicle, you might have spermatocele
or congenital variety of hydrocele
Now whenever you feel swelling go for ultrasonogsaphy at the same time, so that your problem can be picked up.
Best of luck.