Should be fairly simple. The config itself is contained in the NCM_ConfigArchive table. If you're doing SWQL it would be the Cirrus.ConfigArchive table (not the NCM.ConfigArchive table! which doesn't have the config there from what I can tell).
So, a quick query might look like:
SELECT *
FROM [dbo].[NCM_ConfigArchive]
WHERE Config like '%searchtext%'
If you'd rather have something like the Node's name, IP Address and config, you'd have to join it with another table or two, maybe something like this which will find configs that haven't had a config change since the last reboot, but have downloaded a new copy of the RunningConfig.
SELECT TOP 10 ND.Caption, ND.IP_Address, NCA.Config
FROM NCM_ConfigArchive NCA
JOIN NCM_NodeProperties NNP ON (NCA.NodeID = NNP.NodeID)
JOIN NodesData ND ON (ND.NodeID = NNP.CoreNodeID)
WHERE (ConfigType = 'Running') AND (Config LIKE '%No configuration change%')
The same in SWQL would be:
SELECT TOP 10 N.Caption, N.IP_Address, CA.Config
FROM Cirrus.ConfigArchive CA
JOIN NCM.Nodes NNP ON (CA.NodeID = NNP.NodeID)
JOIN Orion.Nodes N ON (N.NodeID = NNP.CoreNodeID)
WHERE (ConfigType = 'Running') AND (Config LIKE '%No configuration change%')
One thing to watch out for is this table can become HUGE, so doing queries on it can cause things to time out. The more you can cut down what it needs to search, the better. If I took off "TOP 10" from either of these queries they time out on me.