How to manually set a return value to a subquery with multiple results
You could try something like this, add a select case to your subquery

select (select case when (select count(*) from subquery) &gt;1 then 'duplicate' else 'not duplicate' end)


Though I'm not sure if I would recommend that, but there is one method.