Up to 12c version for patches / ONEOFF we had installed in a database, we need to use the command line opatch previously setting it to point to the appropriate database. Since version 12c Oracle package includes DBMS_QOPATCH, which gives us the same information, but can run as pl / sql. The following query returns us list of installed patches,.
SELECT XMLTRANSFORM(DBMS_QOPATCH.GET_OPATCH_LIST, DBMS_QOPATCH.GET_OPATCH_XSLT) FROM DUAL;
Please for more information refer to Oracle Doc. since this package has many more options;
HTH – Antonio NAVARRO