Condition using script in dialplan and check MySQL database

Okay lets say I’ve make it like this. After the same => n,Set(MYPRESENCE=${ODBC_PRESENCE(${EXTEN})}) how to catch if is there this user or no… and how to proceed to next contexts ?