Hi Varinder,
I had to do some thing similar with a Menu
I used a Repeater webpart to create a custom menu
In the webpart definition I have set the following properties
Collumns = *, case when '{%currentdocument.nodealiaspath%}' like NodeAliasPath + '%' then 1 else 0 end isHighlighted
This one gives me a collumn that tell me if the current menu item should be hilighted.
in the where condition = DocumentMenuItemHideInNavigation = 0
This filter out any menu items that should not be presented in navigation
<li class="<%# ((int)Eval("isHighlighted") == 1?"CMSListMenuHighlightedLI":"") %>"><a href="<%# GetDocumentUrl() %>"><%# Eval("DocumentName") %></a>
</li>
CMSListMenuHighlightedLI can be replaced by your css class for highlighting
for the caption name I use the generic name <%# Eval("DocumentName") %> because I have multiple document types in my menu