Sure, bitcoin script can in theory compute any computable problem (as can any turing machine). But it doesn't have native access to the data it needs, so pretty much any input you'd want to use needs to be put there by a trusted "oracle" (through a clever encoding into UTXO logic). For example, bitcoin script can't compare the amount of coins sent to two different bitcoin addresses, so you'd need to use oracles to do that [1]. In ethereum script it is trivial to do it on-chain (no oracles needed), since it was designed from the ground up for such use-cases (i.e. "smart contracts").
1. http://bitcoin.stackexchange.com/questions/36229/bitcoin-scr...