Dette burde gøre:
DECLARE @Group VARCHAR(50)
SET @Group = 'Karnataka Customers'
;WITH CTE AS
(
SELECT *
FROM [dbo].[LedgerGroups]
WHERE GroupParent = @Group
UNION ALL
SELECT B.*
FROM CTE A
INNER JOIN [dbo].[LedgerGroups] B
ON A.GroupName = B.GroupPArent
)
SELECT *
FROM CTE
OPTION(MAXRECURSION 0);
Og her er en fungerende sqlfiddle for dig at prøve.