Adding variables into the Query Filter

Nov 27, 2015 at 7:50 PM
I need to be able to filter on a variable.
In my list I have two lookup fields: Category and SubCategory.
I want to filter the SubCategory list based on the Category.
Can I do this? [Title]

<Query>
<Where>
    <Eq>
        <FieldRef Name="Category"/>
        <Value Type="Text">[Title]</Value>
    </Eq>
</Where>
<OrderBy>
    <FieldRef Name="Title"/>
</OrderBy>  
</Query>