How do I creat text slider with code?

I want to make text that each a few seconds will slide and change to a diffrent text.
I made a database with all the texts I want to slide over there and I also connected it to the text.
My quostion is how do I change text to the other text each few seconds?