Fix an abelian coefficient group $B$. Given an inclusion of spaces $A \subset X$, you can let $H^n(X,A) = 0$ for $n \neq 0$, and let $H^0(X,A)$ be the set of all (possibly discontinuous) functions from the underlying set $X^\delta$ of $X$ to $B$ which restrict to zero on $A$. In particular, $H^0(X)$ is the group of all functions $X^\delta \to B$.
(If you like, the map $X \mapsto X^\delta$ is a functor from spaces to spaces which preserves inclusions, "excisive contexts", and takes a point to a (weakly) contractible space, but it does not preserve homotopies. If you have another such functor, you could compose it with cohomology with coefficients in $B$ and get another example.)
This is a little less silly than it sounds. The dual homology functor takes $X$ to the set of formal sums $\sum b_x [x]$ of finite sums of elements of $X$ with coefficients in $B$, and similarly for the relative version. This, as stated, just produces an abelian group. However, there is a natural topology that can be imposed, and (for CW-complexes) the resulting topological abelian group has homotopy groups naturally isomorphic to the singular homology groups of $X$ with coefficients in $B$.