You wouldn't encounter this in a real game, but it seemed to make a nice exercise, so here you go.
(;SZ[19]AW[bn]AW[cn]AW[co]AW[do]AW[eo]AW[fo]AW[go]AW[bp]AW[gp]AW[bq]AW[dq]AW[eq]AW[gq]AW[br]AW[gr]AW[es]AW[gs]AB[ao]AB[bo]AB[ap]AB[cp]AB[dp]AB[ep]AB[fp]AB[cq]AB[fq]AB[cr]AB[fr]AB[fs]C[Best result for white?]GM[1]FF[4]CA[UTF-8]AP[CGoban:2]ST[2]RU[Japanese]KM[0.00]PW[White]PB[Black]PL[W]
(;W[cs];B[bs]
(;W[dr];B[ds]C[Black takes first in this ko.])
(;W[ds];B[ar]C[White has too much to lose in this ko.])
(;W[as];B[dr]
(;W[ds];B[er]C[Black lives.])
(;W[bs];B[er]C[Black lives.]))
(;W[an];B[ds]C[Black lives.]))
(;W[dr];B[bs]
(;W[an];B[ds];W[cs]C[ This is the best ko for both.RIGHT])
(;W[er];B[ds]
(;W[er];B[ar])
(;W[an];B[er]C[Black lives.]))
(;W[ar];B[cs]
(;W[an];B[er]C[Black lives.])
(;W[er];B[ds]
(;W[er];B[as])
(;W[an];B[er]C[Black lives.]))))
(;W[bs];B[ds]C[Black lives.])
(;W[ds];B[cs];W[bs]C[Gote seki, white can do better.])
(;W[er];B[ds]C[Black lives.])
(;W[an];B[ds]C[Black lives.]))