If you can get your variable into a querystring parameter then it's easy to pass it to your SQL Datasource.
for the url "/yourpage.aspx?empid=1234"
Just do this in the where clause:
WHERE EmployeeID = '{%empid%}'
-- OR to use the same datasource for when the querystring doesnt exist
WHERE ('{%empid%}' = '' OR EmployeeID = '{%empid%}')
-- I can't remember for sure, but I don't think Kentico automatically makes querystring parameter macro values SQL Safe, so you might need to replace {%empid%} in the above examples with {%SQLEscape(Querystring["empid"])%}