Thank you very much for your reply. I already used this workaround with multiple queries and Union but this is not a perfect solution for me, because even if PDATA1 is NULL I have to provide a value for the next table. See example below. One other problem is that I have much more complex queries and I need several sub queries if the CASE not works.
I am not an expert on SQL queries and wondering why the CASE structure is not working. Could it be that the CASE statement is not supported?
Could it be that Oracle and Microsoft JET data bases does not support the CASE statement?
SELECT tabPort.ea_guid AS CLASSGUID , tabPort.Object_Type AS CLASSTYPE, tabObject.Name AS BlockpropertyName,
tabPort.Name AS PortName, tabPortType.Name AS PortType, tabPort.Object_ID
FROM t_object tabObject, t_object tabPort, t_object tabPortType
WHERE
tabObject.ea_guid = '<Search Term>' and
tabPort.ParentID = tabObject.Object_ID and
tabPortType.ea_guid = tabPort.PDATA1
UNION
SELECT tabPort.ea_guid AS CLASSGUID , tabPort.Object_Type AS CLASSTYPE, tabObject.Name AS BlockpropertyName,
tabPort.Name AS PortName, tabPortType.Name AS PortType, tabPort.Object_ID
FROM t_object tabObject, t_object tabPort, t_object tabPortType
WHERE
tabObject.ea_guid = '<Search Term>' and
tabPort.ParentID = tabObject.Object_ID and
tabPort.PDATA1 = NULL and
tabPortType.ea_guid = tabPort.ea_guid /* fake */