what is the {character role} for {Beverly Hills, 90210} has {cast member} as {James Pickens} ?
When James Pickens was on Beverly Hills, 90210, what role did he have?
What character did James Pickens play in Beverly Hills, 90210 ?
SELECT ?w WHERE { ?z property:cast_member resource:James_Pickens . resource:Beverly_Hills,_90210 property:cast_member ?z . ?z property:character_role ?w }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q117590> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P161> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q39965> .
?statement <http://www.wikidata.org/entity/P453> ?value. 
} 

SELECT ?value WHERE { wd:Q117590 p:P161 ?s . ?s ps:P161 wd:Q39965 . ?s pq:P453 ?value}