There does a script command get_connection exist but unfortunately for DB connections only.
So even via SQL its a bit tricky - you can use this one (T-SQL) for testing purposes:
select ocv_vname, OCV_VALUE from OCV
where ocv_OH_idnr = (select OH_IDNR from OH where OH_CLIENT = 1 and OH_deleteflag = 0 and OH_NAME = 'CONN.FTPAGENT.XLIGHT')
please modify OH_CLIENT = 1 and OH_NAME = 'CONN.FTPAGENT.XLIGHT' accordningly.