Database

[{"_id":12175,"MatchID":11978,"Players":[{"PlayerID":12063,"PlayerPosition":"Captain","Points":8},{"PlayerID":12041,"PlayerPosition":"Player","Points":3},{"PlayerID":12066,"PlayerPosition":"Player","Points":21},{"PlayerID":12067,"PlayerPosition":"Player","Points":33},{"PlayerID":12064,"PlayerPosition":"Player","Points":0},{"PlayerID":12069,"PlayerPosition":"ViceCaptain","Points":12288},{"PlayerID":12045,"PlayerPosition":"Player","Points":0},{"PlayerID":12074,"PlayerPosition":"Player","Points":-3},{"PlayerID":12079,"PlayerPosition":"Player","Points":8},{"PlayerID":12059,"PlayerPosition":"Player","Points":0},{"PlayerID":12054,"PlayerPosition":"Player","Points":0}],"Points":3141}]

Query

db.collection.update({"MatchID":11978,"Players.PlayerID":12063},[{$set:{Players:{$map:{input:"$Players",in:{$mergeObjects:["$$this",{$cond:[{$eq:["$$this.PlayerID",12063]},{Points:{$switch:{branches:[{case:{$eq:["$$this.PlayerPosition","Captain"]},then:16},{case:{$eq:["$$this.PlayerPosition","ViceCaptain"]},then:12}],default:8}}},"$$this"]}]}}}}}])

Result