I'm trying to do this, in two different ways:
SELECT *
FROM tbl_Parts
WHERE Column_ID = 2807
AND part_author = (case part_private = 'Y' THEN 'domain\username' ELSE part_author END)
And also this way:
SELECT *
FROM tbl_parts
WHERE Column_ID = 2807
and part_author = IIF(part_private = 'Y','domain\username',part_author)
Ultimately, I'm trying to check each row as I select it to see if it is marked private. If it is, then only select that row if the user logged into the application is the part author. If part_private is 'N', then select it for everyone.
Hope that makes enough sense for someone to see what I'm trying to do.