Can a similar script task be used for fetching and displaying data?

I am using a script task to fetch some details from a table. Can I use the same script task to display the fetched data?

  Discussion posts and replies are publicly visible