As described in the following article you can retrieve IP / Hostname of SCCM client using following query
SELECT LEFT(IPAddress0, LEN(‘%.%.%.%.%.%.%’) – patIndex(‘,’, IPAddress0)) AS [IP Address], DNSHostName0 AS [Host Name]
FROM v_GS_NETWORK_ADAPTER_CONFIGUR
WHERE (IPAddress0 IS NOT NULL)
ORDER BY [Host Name]