SAP script display text dynamically
I have a requirement where I need to display some text in the SAp script form based on custom logic. I have to do a select on a custom table and based on the result I have to display some text. How do I do that? where should i write the select statement and how to dsiplay/not-display the text in SAP script?