Solved this. I hope this will help you.
USE YourSharePointDatabaseName;
SELECT
AD.DirName,
AD.LeafName AS Name,
AD.TimeLastModified
tp_ColumnSet.value('(/nvarchar7)[1]', 'nvarchar(200)') AS Title,
tp_ColumnSet.value('(/nvarchar11)[1]', 'nvarchar(200)') AS Col1,
tp_ColumnSet.value('(/nvarchar12)[1]', 'nvarchar(200)') AS Col2,
tp_ColumnSet.value('(/nvarchar13)[1]', 'nvarchar(200)') AS Col3,
tp_ColumnSet.value('(/nvarchar15)[1]', 'nvarchar(200)') AS Col4
FROM
AllUserData AUD WITH (NOLOCK)
INNER JOIN AllDocs AD WITH (NOLOCK) ON AD.Id = AUD.tp_docID;
And once this bit is solved, you can join the SharePoint location field in CRM to join this result set.