You can use either JDBC sender adapter or receiver. Since you do query, this can be achieved in both. Depending on the requirement you choose either sender or receiver. If your sender system is jdbc then use jdbc sender option otherwise receiver. Please refer these links. If you have more questions, let us know.
http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
http://www.riyaz.net/sap/jdbc-adapter-configuration/1200/
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm