You have to loop through the table which you are getting and have to create HTMl for the mail..and after creating HTML string you can simly send the mail using bellow code.
EXEC sp_send_dbmail
@profile_name = 'MailProfile1',
@recipients = 'someone@microsoft.com',
@subject = 'HTML Format',
@body_format = 'HTML',
@body = '<html><body><p>An html link to www.bing.com is embedded in this email. The link is here: <a href="http://www.bing.com">u bing?</a></p></body></html>'