prefix owl: <http://www.w3.org/2002/07/owl#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?first ?second ?firstLabel ?secondLabel
WHERE {
    ?first owl:equivalentClass ?second .

    OPTIONAL {?first rdfs:label ?firstLabel . }
    OPTIONAL { ?second rdfs:label ?secondLabel . }

    FILTER (!isBlank(?first))
    FILTER (!isBlank(?second))
}