LookupField dropdown selection Process

select e from worklog$WorkLog where e.ipAddress = selected value from Lookupfield

How can we passed to query.

Read the documentation.