Hi Anandha,
You are answering yourself. You can use a JDBC lookup in a Message Mapping..
Check Shin's blog http://scn.sap.com//people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-graphical-support-for-jdbc-and-rfc-lookups
SAP documentation: http://help.sap.com/saphelp_nwpi71/helpdata/en/33/1ec6ced273493a993a80c2301c03da/frameset.htm
Regards.