How to join 2 tables when second table will return more rows?
So if I understand your examples correctly it looks like you want the unique list of NumerCzesci values from both tables, except when Zlozenie.NumerCzesci contains &quot;ZŁOŻENIE&quot;. Then you want to use PodZlozenie.NumerCzesci instead. You should be able to achieve that with a FULL JOIN and a DISTINCT clause like so:
SELECT DISTINCT 
    CASE 
        WHEN Zlozenie.NumerCzesci LIKE '%ZŁOŻENIE%' OR Zlozenie.NumerCzesci IS NULL THEN PodZlozenie.NumerCzesci 
        ELSE Zlozenie.NumerCzesci 
    END AS NumerCzesci
FROM Zlozenie
FULL JOIN PodZlozenie
    ON Zlozenie.NumerCzesci = PodZlozenie.NumerPodZlozenia

(You can optionally add ORDER BY NumerCzesci to the end of the above query if you want the results sorted by NumerCzesci in ascending order.)