SQL Query for search in a Parent Child relationship and retrieve all nodes and all their parents
===

I have db table with parent child relationship like:

    ID         Name         ParentID
    -------------------------------------
    1         Computer          0
    2         Software          1
    3         Hardware          1
    4         Windows           2
    5         Games             0
    6         Windows           5
    7         Linux             5
    8         3D                6
    9         DirectX           8

I want to search on this table for word 'Windows' and I want results as below:

    ID         Name         ParentID
    -------------------------------------
    1         Computer          0
    2         Software          1
    4         **Windows**           2
    5         Games             0
    6         **Windows**           5

I mean all **parents** which has no relation with search word should be removed